package com.tbit.manager.api;

import com.tbit.common.entity.pojo.vo.OutAgeVO;
import com.tbit.common.entity.view.Result;
import com.tbit.manager.enums.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 一键停运openFeign
 *
 * @author <a href="mailto:liu.haoxiang@tbit.com.cn">BUGXiang</a>
 * @version 1.0
 * @see <a href="http://adsl1.tbit.com.cn:21490/pages/viewpage.action?pageId=82182491">订单号规范</a> todo
 * @since 2025-4-3
 */
@FeignClient(name = ApiConstants.NAME)
public interface OutAgeApi {

    String PREFIX = ApiConstants.PREFIX + "/outAge";


    /**
     * 查询一键停运
     *
     * @param brandId   品牌id
     * @param accountId 区域id
     * @return OutAgeVO
     */
    @GetMapping(PREFIX + "/queryOutAge")
    OutAgeVO queryOutAge(@RequestParam("brandId") Integer brandId, @RequestParam("accountId") Integer accountId);


    /**
     * 添加或修改一键停运
     * @param outAgeVO outAgeVO
     * @return  Result
     */
    @PostMapping(value = PREFIX + "/addOrUpdate", produces = "application/json", consumes = "application/json")
    Result<Object> addOrUpdate(@RequestBody OutAgeVO outAgeVO);


}
